package com.school.fuyuan.common.message;

import com.school.fuyuan.common.message.Pagination;
import lombok.*;

/**
 * @author zrhong
 * @version 1.0
 * @date 2019/3/3 20:31
 * @description
 */
@Setter
@Getter
@ToString
public class ResponseHead {

    private static final String status = "00";
    private static final String code = "000000";
    private static final String desc = "成功";
//    private static final Pagination pageInfo = null;

    public ResponseHead() {
        this.respStatus = ResponseHead.status;
        this.respCode = ResponseHead.code;
        this.respDesc = ResponseHead.desc;
//        this.pagination = pageInfo;
    }

    public ResponseHead(String respStatus, String respCode, String respDesc) {
        this.respStatus = respStatus;
        this.respCode = respCode;
        this.respDesc = respDesc;
//        this.pagination = pagination;
    }

    private String respStatus;// 00，成功；01，失败

    private String respCode;// 响应码，成功时返回000000；失败时返回错误码

    private String respDesc;// 描述信息，成功时返回success；失败时返回错误信息

//    private Pagination pagination; //分页对象

    public static ResponseHead buildFailedHead() {
        return new ResponseHead("01", "", "");
    }
}
